# $Id: PKGBUILD 75516 2012-08-26 19:58:05Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=kdesvn
pkgver=1.6.0
pkgrel=1
pkgdesc="A pure C++ SVN-client for KDE"
arch=('i686' 'x86_64')
url="http://kdesvn.alwins-world.de/"
license=('GPL')
depends=('kdebase-runtime' 'subversion')
makedepends=('automoc4' 'cmake' 'patch')
conflicts=('qsvn')
install=$pkgname.install
changelog=$pkgname.changelog
source=(http://kdesvn.alwins-world.de/downloads/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('05686f246b76810f90a9f80f1d45cdccf812b42e18fa10a16b14e7d27d370f96')

build() {
  cd ${srcdir}/$pkgname-$pkgver

  cmake . \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_CXX_FLAGS="-DQT_THREAD_SUPPORT" \
    -DLIB_SUFFIX=

  make
}

package() {
  cd ${srcdir}/$pkgname-$pkgver

  make DESTDIR=${pkgdir} install

#removing conflicting files - kdesdk
  rm -f ${pkgdir}/usr/share/kde4/services/svn*

#removing $srcdir reference
  rm -rf ${pkgdir}/usr/share/doc
}
